package cn.remex.contrib.service;

import cn.remex.core.quartz.SchedulerManager;
import cn.remex.web.service.BusinessService;

/**
 * 名称：
 * 缩写：
 * 用途：
 * Created by yangy on 2017/1/11 0011.
 */
@BusinessService
public class TaskService {
	@BusinessService
	public Object schedulers(){
		SchedulerManager.getDefaultScheduler();
		return SchedulerManager.getAllSchedulerNames();
	}
	@BusinessService
	public void shutdown(){
		SchedulerManager.getDefaultScheduler().shutdown();
	}
	@BusinessService
	public void start(){
		SchedulerManager.getDefaultScheduler().start();
	}
	@BusinessService
	public Object jobs(String schedulerName){
		return SchedulerManager.getJobs(schedulerName);
	}
	@BusinessService
	public Object removeJob(String jobKey){
		return SchedulerManager.removeJob(jobKey);
	}
}
